package com.chinasoft.reposearch.service.impl;

import com.chinasoft.reposearch.service.DataSyncService;
import com.chinasoft.reposearch.service.HiveService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Log4j2
@Service
public class DataSyncServiceImpl implements DataSyncService {
    private final HiveService hiveService;
    @Autowired
    public DataSyncServiceImpl(HiveService hiveService) {
        this.hiveService = hiveService;
    }
    @Override
    public void fullSync() {
        hiveService.queryForAllList(new String[]{"*"}, "repo_search.repo");
    }
}
